#ifndef _ARP_LINK_H_
#define _ARP_LINK_H_

typedef struct arp_link
{
    unsigned char ip[4];
    unsigned char mac[6];
    struct arp_link * next;

}ARP_LINK;

extern ARP_LINK* arp_head;


/******************************************************************
函	数:	ARP_LINK *inner_arp_link(ARP_LINK *head,ARP_LINK* p)
功	能:	插入ARP链表
参	数:	ARP_LINK *head ARP链表头  unsigned char *ip IP地址
返回值: ARP_LINK *head ARP链表头
*******************************************************************/
extern ARP_LINK* inner_arp_link(ARP_LINK *head , ARP_LINK* p);


/******************************************************************
函	数:	ARP_LINK* find_arp_from_link(ARP_LINK *head,unsigned char * ip)
功	能:	根据ip查找 mac
参	数:	ARP_LINK *head ARP链表头  unsigned char *ip IP地址
返回值: ARP_LINK *head ARP链表头
*******************************************************************/
extern ARP_LINK* find_arp_byip(ARP_LINK *head, unsigned char * ip);




/******************************************************************
函	数:	void free_all_arp_link()
功	能: 释放所有的arp_link 节点
参	数: 
返回值: void 
*******************************************************************/
extern void free_all_arp_link();


#endif